package com.qf.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.qf.mapper.DtsOrderGoodsMapper;
import com.qf.pojo.DtsOrderGoods;
import com.qf.service.DtsOrderGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @version v1.0.0
 * @Description:
 * @author: 姜红凯
 * @date: 2022.02.24
 * @since 1.0
 */
@Service
public class DtsOrderGoodsServiceImpl implements DtsOrderGoodsService {

    @Autowired
    DtsOrderGoodsMapper orderGoodsMapper;

    @Override
    public List<DtsOrderGoods> findByGoodsId(Integer id) {

        LambdaQueryWrapper<DtsOrderGoods> wrapper = new LambdaQueryWrapper<>();

        wrapper.eq(DtsOrderGoods ::getGoodsId,id);

        List<DtsOrderGoods> dtsOrderGoods = orderGoodsMapper.selectList(wrapper);
        return dtsOrderGoods;
    }
}
